package com.ruoyi.my.service.impl;

import com.ruoyi.my.domain.MyCategoryDetail;
import com.ruoyi.my.mapper.MyCategoryDetailMapper;
import com.ruoyi.my.service.MyCategoryDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class MyCategoryDetailServiceImpl implements MyCategoryDetailService {

    @Autowired
    MyCategoryDetailMapper myCategoryDetailMapper;


    @Override
    public List<MyCategoryDetail> selectMyCategoryDetailByCategoryId(Integer categoryID) {
        Map<String,Object> colmap = new HashMap<>();
        colmap.put("category_id",categoryID);
        return myCategoryDetailMapper.selectByMap(colmap);
    }

    @Override
    public MyCategoryDetail selectMyCategoryDetailByID(Integer categoryID) {
        return myCategoryDetailMapper.selectById(categoryID);
    }
}
